<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!--360浏览器优先以webkit内核解析-->
		<title>欢迎页面</title>
		<link rel="shortcut icon" href="favicon.ico">
		<link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
		<link href="css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

		<link href="${pageContext.request.contextPath}/css/animate.min.css" rel="stylesheet">
		<link href="${pageContext.request.contextPath}/css/style.min.css?v=4.1.0" rel="stylesheet">
		<style>
			.left{
				margin-left: 20px;
			}
			.item img{
				height: 840px !important;
				width: 100%;
			}
		</style>
	</head>

	<body class="gray-bg">
		<div class="row  border-bottom white-bg dashboard-header">
			<div class="col-sm-12">
				<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="3000">
					<!-- 轮播（Carousel）指标 -->
					<ol class="carousel-indicators">
					</ol>
					<!-- 轮播（Carousel）项目 -->
					<div class="carousel-inner">
					</div>
					<!-- 轮播（Carousel）导航 -->
					<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">Previous</span>
					</a>
					<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">Next</span>
					</a>
				</div>
			</div>
		</div>

<script src="${pageContext.request.contextPath}/js/jquery.min.js?v=2.1.4"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js?v=3.3.6"></script>
<script src="${pageContext.request.contextPath}/js/plugins/layer/layer.min.js"></script>
<script src="${pageContext.request.contextPath}/js/content.min.js"></script>
<%-- <script src="${pageContext.request.contextPath}/js/welcome.min.js"></script> --%>

<script type="text/javascript">
$(function() {
	layer.config({
	    extend: ["extend/layer.ext.js", "skin/moon/style.css"],
	    skin: "layer-ext-moon"
	}),
	    layer.ready(function() {
	        function e() {
	            parent.layer.open({
	                title: "�������ģ��ټ���",
	                type: 1,
	                area: ["700px", "auto"],
	                content: t,
	                btn: ["ȷ��", "ȡ��"]
	            })
	        }
	        var t = $("#welcome-template").html();
	        $("a.viewlog").click(function() {
	            return e(),
	                !1
	        }),
	            $("#pay-qrcode").click(function() {
	                var e = $(this).html();
	                parent.layer.open({
	                    title: !1,
	                    type: 1,
	                    closeBtn: !1,
	                    shadeClose: !0,
	                    area: ["600px", "auto"],
	                    content: e
	                })
	            }),
	            console.log("【兔兔搬家管理后台】");
	    });
	
	//加载所有配置的幻灯片
	$.ajax({
		url : "./slideshow/getSlideShowInfo.htm",
		cache : false,
		async : false,
		type : "get",
		dataType : "json",
		beforeSend : function() {
			layer.load(0, {
				shade : false
			});
		},
		complete : function() {
			layer.closeAll("loading");
		},
		success : function(result) {
			if (result.status == 0) {
				var data = result.data;
				for(var i=0; i < data.length; i++){
					if(i == 0){
						$(".carousel-indicators").append('<li data-target="#myCarousel" data-slide-to="' + i + '" class="active"></li>');
						$(".carousel-inner").append('<div class="item active"><img src="${pageContext.request.contextPath}/img/slideshow/' + data[i].slideImgName + '" alt="' + data[i].slideImgName + '"></div>');
					}else{
						$(".carousel-indicators").append('<li data-target="#myCarousel" data-slide-to="' + i + '"></li>');
						$(".carousel-inner").append('<div class="item"><img src="${pageContext.request.contextPath}/img/slideshow/' + data[i].slideImgName + '" alt="' + data[i].slideImgName + '"></div>');
					}
				}
				return;
			}
		}
	});
});
</script>
</body>
</html>